﻿@{
    ViewBag.Title = "Run Script";
}

<h2>Run Python Script</h2>
@using (Html.BeginForm("Index", "RunScript", FormMethod.Post)) {
    <textarea id="txtScript" name="txtScript" rows="15" cols="60" >@Html.Raw(ViewBag.Script)</textarea><br />
    <input type="submit" id="btnSubmit" name="btnSubmit" value="Run Script" />
    <input type="button" id="btnClear" name="btnClear" value="Clear" />
}
<div id="result">
    @Html.Raw(ViewBag.Result)
</div>
@section Scripts {
    <script type="text/javascript">
        $(document).ready(function () {
            $("#btnClear").click(function () {
                $("#txtScript").val("");
                $("#result").val("");
            });
        });
    </script>
}

